syntax errors in perl
am 26.08.2009 18:59:52 von beegee beegee--===============1994494241==
Content-Type: multipart/alternative; boundary=0016368e21c02dd19604720e612a
--0016368e21c02dd19604720e612a
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi, I am running PERL (v5.8.6) on a mac os x 10.4.11.I am a complete
newcomer to PERL
I was referring to the book
"PERL programming for the absolute beginner" by Jerry Lee Ford Jr.
I tried to run this code from the book (code is in green font)
#! /usr/bin/perl -w
#
# JokeMachine.pl
clear_the_screen();
$reply = " "
while ($reply ne 'yes') {
print 'Would you like to hear a joke? (yes/no): ' ;
chomp($reply =
if($reply ne 'yes') {
print "\n Hum.......Perhaps you misunderstood \n\n";
}
}
clear_the_screen();
print "\n What disappears the moment you say it's name? \n\n";
chomp($reply =
if (reply ne 'silence') {
print "\n Sorry. Wrong Answer\n";
} else {
print "\n Yes that is the right answer\n\n";
}
*and got the following error (Note: pe was on a line above rl JokeM.....)*
--0016368e21c02dd19604720e612a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi, I am running PERL (v5.8.6) on a =A0mac os x 10.4.11.
e newcomer to PERL
;PERL programming for the absolute beginner" by Jerry Lee Ford Jr.
v>
perl -w
..pl
=
span>
een();
=
span>
uot; "
=
55);">while ($reply ne &=
#39;yes') =A0{
you like to hear a joke? (yes/no): =A0 ' ;
<STDIN>);
;yes') {
um.......Perhaps you misunderstood \n\n";
=
55);"> =A0 =A0}=
span>
=
55);">}
ont>
een();
=
span>
n What disappears the moment you say it's name? \n\n";
n>
=3D <STDIN>);
=
55);">if (reply ne '=
silence') {
rry. =A0Wrong Answer\n";
=
55);">} else {
pan>
s that is the right answer\n\n";
/font>
keM.....)
--0016368e21c02dd19604720e612a--
--===============1994494241==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1994494241==--